package com.sumainfor.pc.gmio.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.HoHousekeeperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author zc
 * @ClassName HohousekeeperController
 * @date 2019/11/30 19:06
 * @description: TODO
 */
@Controller
@RequestMapping("/Hohousekeeper")
public class HoHousekeeperController {

    @Autowired
    HoHousekeeperService hoHousekeeperService;

    /**
     * 退租查询剩余未交费账单
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/UnpaidBill")
    public JsonResult UnpaidBill(@RequestBody Map<String,Object> params){
       return  hoHousekeeperService.UnpaidBill(params);
    }

    /**
     * 查询退租时已产生固定金额的水电燃宽
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getWGEKBill")
    public JsonResult getWGEKBill(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.getWGEKBill(params);
    }

    /**
     * 管家退租时查询未缴夜间开门费
     */
    @ResponseBody
    @PostMapping("/getNightRoom")
    public JsonResult getNightRoom(@RequestBody Map<String,Object> params) {
        return hoHousekeeperService.getNightRoom(params);

    }




    /**
     * 管家退租
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/addHouseKeeper")
    public JsonResult addHouseKeeper(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.addHouseKeeper(params);
    }

    /**
     * 测试管家退租的水电燃
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/ceshishuidianran")
    public JsonResult ceshishuidianran(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.ceshishuidianran(params);
    }

    /**
     * 管家退租计算抄表电费
     */
    @ResponseBody
    @PostMapping("/EleLeave")
    public JsonResult EleLeave(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.EleLeave(params);
    }

    /**
     * 管家退租计算抄表水费
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/WatLeave")
    public JsonResult WatLeave(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.WatLeave(params);
    }

    /**
     * 管家退租计算抄表燃气费
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/GasLeave")
    public JsonResult GasLeave(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.GasLeave(params);
    }

    /**
     * 补充收费标准
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/ChargeFee")
    public JsonResult ChargeFee(@RequestBody Map<String,Object> params){
        return hoHousekeeperService.ChargeFee(params);
    }


}
